package mapa.escrevemapa;

import java.util.ArrayList;

import android.os.Bundle;
import mapa.escrevemapa.Ponto;

import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapView;

public class Main extends MapActivity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        //this.configMap();
        
        MapView mapview = (MapView) findViewById(R.id.mapview);
    	mapview.setBuiltInZoomControls(true);
    	mapview.getController().setCenter(new GeoPoint(-22857027,-43230386));
    	mapview.getController().setZoom(14);
        
        ArrayList<Ponto> geoPoints = new ArrayList<Ponto>();
        geoPoints.add(new Ponto(-22.858084,-43.232274,"CCMN"));
        geoPoints.add(new Ponto(-22.861821,-43.228734,"CT"));
        geoPoints.add(new Ponto(-22.861881,-43.223369,"REITORIA"));
        geoPoints.add(new Ponto(-22.893511,-43.236737,"HOSPITAL"));
        
        PlacesOverlay po = new PlacesOverlay(geoPoints);
		mapview.getOverlays().add(po);
        
    }
    
    /*public void configMap(){
    	MapView mapview = (MapView) findViewById(R.id.mapview);
    	mapview.setBuiltInZoomControls(true);
    	mapview.getController().setCenter(new GeoPoint(-22857027,-43230386));
    	mapview.getController().setZoom(14);
    }*/

	@Override
	protected boolean isRouteDisplayed() {
		// TODO Auto-generated method stub
		return false;
	}
}